<CFQUERY NAME="getprod" DATASOURCE="#dsn#">
select *
from tblproducts
<cfif isdefined("prodid")>where prodid = '#prodid#'</cfif>
ORDER BY Category
</CFQUERY>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" />
<!---
noty({"text":"Product has been deleted.","layout":"topCenter","type":"information","animateOpen":{"height":"toggle"},"animateClose":{"height":"toggle"},"speed":500,"timeout":2000,"closeButton":false,"closeOnSelfClick":true,"closeOnSelfOver":false});
--->
<title>EDIT PRODUCT</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {font-size: 18px}
.style5 {
	color: #666666;
	font-size: 10px;
}
.style12 {color: #666666; font-weight: bold; font-size: 12px; }
.style13 {font-size: 12px}
-->
</style>
<script>
$(function() {
	$( "#tabs" ).tabs();
});
</script>
</head>
<body style="font-size:62.5%;">
  

</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="213" border="0" align="left" cellpadding="2" cellspacing="0">
      <tr>
        <td width="31" height="55" bgcolor="#eeeeee"><img src="../images/edit.png" width="55" height="51" /></td>
        <td width="182" height="55" bgcolor="#eeeeee">Edit Item</td>
      </tr>
    </table>
    <br /></td>
  </tr>
  <tr>
    <td><hr size="1" noshade="noshade" /></td>
  </tr>
</table>
<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Product Basics</a></li>
		<li><a href="#tabs-2">Details</a></li>
		<li><a href="#tabs-3">Delete Product</a></li>
	</ul>
	<cfform name="form1" id="form1" method="post" action="update_item.cfm?ProdID=#getprod.Prodid#">
	<div id="tabs-1">
		<p>
			<table width="100%" border="0" cellspacing="0" cellpadding="3">
			<cfoutput query="getprod">
			<tr>
				<td width="60"><span class="style12">UPC</span></td>
				<td height="35" width="60"><span class="style5"><input name="new_prod_id" value="#ProdID#"></span></td>
			</tr>
			<tr>
				<td><span class="style12">Product Name</span></td>
				<td height="35" class="style5"><input name="ProductName" value="#ProductName#"></td>
			</tr>
			<tr>
				<td><span class="style12">Cost</span></td>
				<td height="35" class="style5"><input name="Cost" value="#LSCURRENCYFORMAT(Cost)#"></td>
			</tr>
			<tr>
				<td align="left"><span class="style12">Price</span></td>
				<td height="35" align="left" class="style5"><input name="price" value="#LSCURRENCYFORMAT(Price)#"></td>
			</tr>
			<tr>
				<td align="left"><span class="style12">Tax</span></td>
				<td height="35" align="left" class="style5"><input name="tax" value="#Tax#"></td>
			</tr>
			<tr>
				<td align="left"><span class="style12">QTY</span></td>
				<td height="35" align="left" class="style5"><input name="qty" value="#Qty#"></td>
			</tr>
			<tr>
				<td align="center" colspan="2"><input type="Submit" value="UPDATE" style="width:200px;height:75px;font-size:20pt;"></td>
			</tr>
         </cfoutput>
        </table>
		</p>
	</div>
	<div id="tabs-2">
		<p>
			<table width="100%" border="0" cellspacing="0" cellpadding="3">
				<cfoutput query="getprod">
					<tr>
						<td align="left"><span class="style12">Category</span></td>
						<td height="35" align="left" class="style5"><input name="category" value="#category#"></td>
					</tr>
					<tr>
						<td align="center" colspan="2"><input type="Submit" value="UPDATE" style="width:200px;height:75px;font-size:20pt;"></td>
					</tr>
				</cfoutput>
			</table>
	</div>
	</cfform>
	<div id="tabs-3">
		<p>
		<cfoutput>
		<cfform method="post" action="delete_item.cfm?prodid=#prodid#">
			<input type="submit" value="DELETE #ucase(getprod.ProductName)#" style="width:200px;height:75px;font-size:20pt;color:Red;">
		</cfform>
		</cfoutput>
		</p>
	</div>
</div>
</body>
</html>
